package com.bootlever.framework.fastdfs.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "bootlever.framework.fastdfs")
public class FastdfsProperties {

    private Integer connectTimeout = 2;
    private Integer networkTimeout = 30;
    private String charset = "UTF-8";
    private String trackerServer = "127.0.0.1:22122";
    private String exclude = "exe,sh,bat";
    private HttpConfig http = new HttpConfig();

    public static class HttpConfig {
        private Integer trackerHttpPort = 8080;
        private boolean antiStealToken = false;
        private String secretKey = "FastDFS1234567890";

        public Integer getTrackerHttpPort() {
            return trackerHttpPort;
        }

        public void setTrackerHttpPort(Integer trackerHttpPort) {
            this.trackerHttpPort = trackerHttpPort;
        }

        public boolean isAntiStealToken() {
            return antiStealToken;
        }

        public void setAntiStealToken(boolean antiStealToken) {
            this.antiStealToken = antiStealToken;
        }

        public String getSecretKey() {
            return secretKey;
        }

        public void setSecretKey(String secretKey) {
            this.secretKey = secretKey;
        }
    }

    public Integer getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(Integer connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public Integer getNetworkTimeout() {
        return networkTimeout;
    }

    public void setNetworkTimeout(Integer networkTimeout) {
        this.networkTimeout = networkTimeout;
    }

    public String getCharset() {
        return charset;
    }

    public void setCharset(String charset) {
        this.charset = charset;
    }

    public HttpConfig getHttp() {
        return http;
    }

    public void setHttp(HttpConfig http) {
        this.http = http;
    }

    public String getTrackerServer() {
        return trackerServer;
    }

    public void setTrackerServer(String trackerServer) {
        this.trackerServer = trackerServer;
    }

    public String getExclude() {
        return exclude;
    }

    public void setExclude(String exclude) {
        this.exclude = exclude;
    }
}
